import http from '../http/index';

export function apiGetToken(data: any) {
  return http({
    method: 'POST',
    url: '/api/login/loginByAccount',
    data,
  });
}
// 登录
export function apiLogin(data: any) {
  return http({
    method: 'POST',
    url: '/admin/login',
    data,
  });
}

export function apiGetAdminLoginCode(params?: any) {
  return http({
    method: 'GET',
    url: '/admin/loginCaptcha',
    params,
  });
}

export function apiGetUserInfo(params?: any) {
  return http({
    method: 'GET',
    url: '/admin/info',
    params,
  });
}

export function apiLoginOut(data?: any) {
  return http({
    method: 'POST',
    url: '/admin/logout',
    data,
  });
}

export function apiGetNoticeNum() {
  return http({
    method: 'GET',
    url: '/systemTool/selectTodoListCount',
  });
}

export function apiGetNoticeList() {
  return http({
    method: 'GET',
    url: '/systemTool/selectTodoList',
  });
}

export function apiChangeNoticeState(data?: any) {
  return http({
    method: 'POST',
    url: '/systemTool/updateTodoStateById',
    data,
  });
}
